<script
	src="<?= base_url(); ?>third_party/ckeditor/ckeditor.js"></script>


<section class="wrapper">
	<!-- page start-->
	<section class="panel">
		<header class="panel-heading"> NEWS MANAGEMENT <span class="pull-right"><a href="<?= base_url();?>news/admin/admin_news" type="button" class="btn btn-success btn-sm">Back to NewsManagement</a></span></header>
		<div class="panel-body">
			<form class="form-horizontal" role="form" name="news" method="POST" action="<?= base_url(); ?>news/admin/admin_news/update_news">
				<?php
				$this->session->flashdata('message'); {
					$msg = $this->session->flashdata('message');
					echo '<font color="red">' . $msg . '</font>';
				}
				?>
				<div class="form-group">
					<label for="input" class="col-lg-2 control-label">Title</label>
					<div class="col-lg-8">
						<input type="text" class="form-control" id="title" name="title" value="<?= $newsrow['info']->title; ?>"
							placeholder="Title">
					</div>
				</div>


				<div class="form-group">
					<label for="input" class="col-lg-2 control-label">Meta Title</label>
					<div class="col-lg-8">
						<input type="text" class="form-control" id="meta_title" name="meta_title" value="<?= $newsrow['info']->meta_title; ?>"
							placeholder="Title">
					</div>
				</div>

				<div class="form-group">
					<label for="input" class="col-lg-2 control-label">Meta Keyword</label>
					<div class="col-lg-8">
						<textarea name="meta_keyword" id="meta_keyword" class="form-control" rows="3">
						<?= $newsrow['info']->meta_keyword; ?>
						</textarea>
					</div>
				</div>

				<div class="form-group">
					<label for="input" class="col-lg-2 control-label">Meta Description</label>
					<div class="col-lg-8">
						<textarea name="meta_description" id="meta_description" class="form-control" rows="3">
						<?= $newsrow['info']->meta_description; ?>
						</textarea>
					</div>
				</div>

				<div class="form-group">
					<label for="input" class="col-lg-2 control-label">Desciption</label>
					<div class="col-lg-8">

						<textarea class="form-control ckeditor" id="news_details" name="news_detail" rows="6">
						<?= $newsrow['info']->description; ?>
						</textarea>
<script type="text/javascript">
                            CKEDITOR.replace( 'news_details',
                            {
                                skin : 'v2',
                                enterMode : CKEDITOR.ENTER_BR,
                                toolbar :
                                    [
                                    [ 'Bold', 'Italic', '-', 'NumberedList', 'BulletedList', '-', 'Link', 'Unlink' ],
                                    [ 'UIColor' ]
                                ]

                            });
                        </script>
					</div>
				</div>

				<div class="form-group">
					<div class="col-lg-offset-2 col-lg-8">
					<input type="hidden" name="news_id" value="<?= $newsrow['info']->id; ?>"/>
						<input type="submit" class="btn btn-info pull-right" value="Update News" name="update_news" <?php if($this->config->item('mode')=='DEMO'){?>onclick="alert ('Sorry! Not allowed in demo mode '); return false;" <?} else?>onclick="return confirm('Are you sure ?');" >
					</div>
				</div>


			</form>
		</div>
		<!-- End of Body Panel -->
	</section>
	</section>